<include file="Public:header" />
<!--出编辑出租房-->
<form id="info_form" action="{:U('Rental/edit')}" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="{$info.id}">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">房源信息</li>
            <li>SEO设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <php>if($info['user_id']){</php>
                    <tr>
                        <th width="120">发布会员 :</th>
                        <td>ID:用户名:{$user.username},手机:{$user.mobile},邮箱:{$user.email}&nbsp;<a style="color: #008000" target="_blank" href="{:U('User/edit',array('id'=>$user['id'],'menuid'=>266))}">查看会员信息</a></td>
                    </tr>
                    <php>}</php>
                    <tr>
                        <th width="100">所属区域 :</th>
                        <td><select class="J_cate_select mr10" data-pid="0" data-menuid="1" data-uri="{:U('AreaCate/ajax_getchilds')}" data-selected="{$selected_ids}"></select>
                            <input type="hidden" name="area_id" id="J_cate_id" value="{$info.area_id}" /></td>
                    </tr>
                    <tr>
                        <th width="120">所属小区 :</th>
                        <td>
                            <select name="estate_id" id="estate_id">
                                <option value="0">--请选择--</option>
                                <volist name="estate" id="vo">
                                    <option  <php>if($vo['id']==$info['estate_id']){</php>selected="selected"<php>}</php> value="{$vo.id}">{$vo.title}</option>
                                </volist>
                            </select>
                        </td>
                    </tr>

		            <tr>
						<th>房源名称 :</th>
						<td>
                            <input type="text" name="title" value="{$info.title}" id="J_title" class="input-text" size="40">
		                </td>
					</tr>
                    <tr>
                    <th>户型 :</th>
                    <td>
                        <select name="room" id="room">
                            <option value="0">-所有-</option>
                            <volist name="menu[24]" id="vo">
                                <option <php>if($vo['parameter']==$info['room']){</php>selected="selected"<php>}</php> value="{$vo.parameter}">{$vo.name}</option>
                            </volist>
                        </select><span>室</span>
                        <select name="hall" id="hall">
                            <option value="0">-所有-</option>
                            <volist name="menu[24]" id="vo">
                                <option <php>if($vo['parameter']==$info['hall']){</php>selected="selected"<php>}</php> value="{$vo.parameter}">{$vo.name}</option>
                            </volist>
                        </select><span>厅</span>
                        <select name="kitchen" id="kitchen">
                            <option value="0">-所有-</option>
                            <volist name="menu[24]" id="vo">
                                <option <php>if($vo['parameter']==$info['kitchen']){</php>selected="selected"<php>}</php> value="{$vo.parameter}">{$vo.name}</option>
                            </volist>
                        </select><span>卫</span>
                        <select name="toilet" id="toilet">
                            <option value="0">-所有-</option>
                            <volist name="menu[24]" id="vo">
                                <option <php>if($vo['parameter']==$info['toilet']){</php>selected="selected"<php>}</php> value="{$vo.parameter}">{$vo.name}</option>
                            </volist>
                        </select><span>厨</span>
                        <select name="balcony" id="balcony">
                            <option value="0">-所有-</option>
                            <volist name="menu[24]" id="vo">
                                <option <php>if($vo['parameter']==$info['balcony']){</php>selected="selected"<php>}</php> value="{$vo.parameter}">{$vo.name}</option>
                            </volist>
                        </select><span>阳台</span>
                    </td>
                    </tr>
                    <tr>
                       <th>价格 :</th>
                        <td>月租价 : <input type="text" value="{$info.price}" name="price" id="price" class="input-text" size="8"/><span>元</span>&nbsp;&nbsp;
                            押金: <input type="text" name="deposit" value="{$info.deposit}" id="deposit" class="input-text" size="8"/><span>元</span>&nbsp;&nbsp;
                            面积 : <input type="text" name="area"  value="{$info.area}" id="area" class="input-text" size="8"/><span>平米</span>
                        </td>
                    </tr>
                    <tr>
                        <th>楼层 :</th>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp; 第 :<input type="text" value="{$info.floor}" name="floor" class="input-text" size="5"><span>层</span>
                            共<input type="text" name="total_floor" value="{$info.total_floor}" class="input-text" size="5"><span>层</span>
                        </td>
                    </tr>
                    <tr>
                        <th>楼房类型 :</th>
                        <td>{:getLinkMenu(2,'house_type','checkbox',$house_type)}</td>
                    </tr>
                    <tr>
                        <th>装修情况 :</th>
                        <td>{:getLinkMenu(10,'renovation_type','radio',$info['renovation_type'])}</td>
                    </tr>
                    <tr>
                        <th>朝向 :</th>
                        <td>{:getLinkMenu(17,'orientations','radio',$info['orientations'])}</td>
                    </tr>
                    <tr>
                        <th>房屋配套 :</th>
                        <td>{:getLinkMenu(20,'mating','checkbox',$mating)}</td>
                    </tr>
                    <tr>
                        <th>地铁 :</th>
                        <td>{:getLinkMenu(8,'metro','radio',$info['metro'])}</td>
                    </tr>
                    <tr>
                        <th>出租方式 :</th>
                        <td>{:getLinkMenu(26,'rental_mode','radio',$info['rental_mode'])}</td>
                    </tr>
                    <tr>
                        <th>租房支付方式 :</th>
                        <td>{:getLinkMenu(25,'pay_type','radio',$info['pay_type'])}</td>
                    </tr>
                    <tr>
                        <th>建筑年代 :</th>
                        <td><input type="text" name="years" value="{$info.years}" size="10" class="input-text"> 年</td>
                    </tr>
                    <tr>
                        <th>特色标签 :</th>
                        <td><textarea name="tags" id="tags" style="width:680px;height:50px;resize: none;">{$info.tags}</textarea>多个标签用','号隔开</td>
                    </tr>
                    <tr>
                        <th>所在地址 :</th>
                        <td><input type="text" name="address" id="address" value="{$info.address}" class="input-text" size="60"/> </td>
                    </tr>
                    <tr>
                        <th>地图标注：</th>
                        <td>
                            <input type="text" name="map" value="{$info.map}" id="map" class="input-text" size="27"/>
                            &nbsp;&nbsp;<a href="http://api.map.baidu.com/lbsapi/getpoint/" style="padding: 8px;color:#ffffff;background: #008000" target="_blank">获取百度地图坐标</a>
                        </td>
                    </tr>
                    <tr>
                        <th>缩略图:</th>
                        <td>
                            <notempty name="info['img']"><img src="{$info.img}" width="100" height="100"/><br /></notempty>
                            <input type="file" name="img" id="img" class="input-text"  style="width:200px;" /></td>
                    </tr>
                    <tr>
                        <th>房源图片 :</th>
                        <td><script id="uploadpic" name="uploadpic" type="text/plain"></script>
                            <input type="button" class="btn btn_submit" style="margin:0 0 10px 10px;" onclick="upImage();" value="选择图片">
                            <div id="imageList">
                                <ul class="list clearfix">
                                    <volist name="img_list" id="vo">
                                        <li>
                                            <img width="113" height="113" alt="{$vo.alt}" src="{$vo.img}">
                                            <input type="hidden" value="{$vo.img}" name="pic[pic][]">
                                            <input type="text" class="imgtitletxt" value="{$vo.alt}" name="pic[alt][]">
                                            <div class="delbox"><span class="del">删除</span></div>
                                        </li>
                                    </volist>
                                </ul>
                            </div>
                            <input type="hidden" name="file" id="file" />
                        </td>
                    </tr>
                    <tr>
                        <th>房源介绍 :</th>
                        <td><textarea name="info" id="info">{$info.info}</textarea></td>
                    </tr>
                    <tr>
                        <th>联系人 :</th>
                        <td><input type="text" name="contacts" value="{$info.contacts}" id="contacts" class="input-text" size="25"/> </td>
                    </tr>
                    <tr>
                        <th>联系电话 :</th>
                        <td><input type="text" name="phone" id="phone" value="{$info.phone}" class="input-text" size="30"/> </td>
                    </tr>
                    <tr>
                        <th>发布 :</th>
                        <td>
                            <select name="status" id="status">
                                <volist name="status" id="vo">
                                    <option <php>if($key==$info['status']){</php>selected="selected"<php>}</php> value="{$key}">{$vo}</option>
                                </volist>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>相关推荐</th>
                        <td>
                            是否推荐:
                            <label><input type="radio" name="is_rec" class="radio_style" value="1" <if condition="$info.is_rec eq '1'">checked="checked"</if> > {:L('yes')} </label>&nbsp;
                            <label><input type="radio" name="is_rec" class="radio_style" value="0" <if condition="$info.is_rec eq '0'">checked="checked"</if> > {:L('no')}</label>
                            &nbsp;&nbsp;
                            急租房源:
                            <label><input type="radio" name="is_emergency" class="radio_style" value="1" <if condition="$info.is_emergency eq '1'">checked="checked"</if> > {:L('yes')} </label>&nbsp;
                            <label><input type="radio" name="is_emergency" class="radio_style" value="0" <if condition="$info.is_emergency eq '0'">checked="checked"</if> > {:L('no')}</label>
                            &nbsp;&nbsp;
                            房源来源:
                            <label><input type="radio" name="source" class="radio_style" value="1" <if condition="$info.source eq '1'">checked="checked"</if> >个人</label>&nbsp;
                            <label><input type="radio" name="source" class="radio_style" value="2" <if condition="$info.source eq '2'">checked="checked"</if> >中介/公司</label>
                        </td>
                    </tr>
				</table>
			</div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">{:L('seo_title')} :</th>
                        <td><input type="text" name="seo_title" value="{$info.seo_title}" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>{:L('seo_keys')} :</th>
                        <td><input type="text" name="seo_keys" value="{$info.seo_desc}" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>{:L('seo_desc')} :</th>
                        <td><textarea name="seo_desc" id="seo_desc" cols="80" rows="8">{$info.seo_desc}</textarea></td>
                    </tr>
                </table>
            </div>

            </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
<include file="Public:footer" />
<js file="__STATIC__/ueditor/ueditor.config.js" charset="utf-8" />
<js file="__STATIC__/ueditor/ueditor.all.min.js" charset="utf-8" />
<js file="__STATIC__/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" />
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
    window.onload=function(){
        upmoreimg();
        window.UEDITOR_CONFIG.initialFrameWidth=880;
        window.UEDITOR_CONFIG.initialFrameHeight=500;
        UE.getEditor('info',{autoFloatEnabled:false});
    }
</script>
<script type="text/javascript">
    var check_name_url = "{:U('Rental/ajaxCheckTitle')}";
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $('.J_cate_select').cate_select('请选择');
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $(":radio[name^='renovation_type']").formValidator({onshow:"请选择装修情况",onfocus:"请选择装修情况"}).inputValidator({min:1,max:10,onerror:"请选择装修情况"});
    });
</script>
<js file="__JS__/uploadImg.js" charset="utf-8" />
</body>
</html>